// WTLBrowserView.cpp : implementation of the CBrowserView class
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "resource.h"

#include "BrowserView.h"
//MOUSE_EVENT_HANDLER CBrowserView::m_MouseUp = NULL;

//template<class T,UINT nID> MOUSE_EVENT_HANDLER  CWebBrowser2<T,nID>::m_MouseUp = NULL;
//MOUSE_EVENT_HANDLER CWebBrowser2<CBrowserView,UINT>::m_MouseUp = NULL;
BOOL CBrowserView::PreTranslateMessage(MSG* pMsg)
{
	if((pMsg->message < WM_KEYFIRST || pMsg->message > WM_KEYLAST) &&
	   (pMsg->message < WM_MOUSEFIRST || pMsg->message > WM_MOUSELAST))
		return FALSE;

	// give HTML page a chance to translate this message
	return (BOOL)SendMessage(WM_FORWARDMSG, 0, (LPARAM)pMsg);
}

void CBrowserView::OnNavigateComplete2(IDispatch* pDisp, const CString& szURL)
{
	//m_URL.SetWindowText(GetLocationURL());
}

void CBrowserView::OnStatusTextChange(const CString& szText)
{
	//m_StatusBar.SetPaneText(ID_DEFAULT_PANE,szText);
}

void CBrowserView::OnProgressChange(long nProgress, long nProgressMax)
{
	CString szText;
	if (nProgressMax>0)
		szText.Format(_T("%d%%"),nProgress*100/nProgressMax);
	//m_StatusBar.SetPaneText(IDR_PROGRESS,szText);
}

void CBrowserView::OnSetSecureLockIcon(long nSecureLockIcon)
{
	m_bSecured=nSecureLockIcon>0;
}

